<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box {
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>
<body>
<div id="app">
    <button @click="handler">change</button>
    <!--<div class="box" v-if="isShowBox"></div>-->
    <div class="box" v-show="isShowBox"></div>
</div>
<script src="../../JavaScript/vue.js"></script>
<script>

    const app = Vue.createApp({
        data() {
            return {
                isShowBox: true
            }
        },
        methods: {
            handler() {
                this.isShowBox = !this.isShowBox
            }
        }
    })
    app.mount("#app")
</script>
</body>
</html>